import { number } from "@intlify/core-base";

export class ClassPagination {
    /** 
     *当前页码
     */
    pageNo: number = 1;//当前页码
    /** 
     *每页数量
     */
    pageSize: number = 10;//每页显示的记录数量
    /** 
     *记录总数
     */
    total: number = 1;//记录总数量
}

export class ClassCouponAdd {
    /** 
     * 优惠劵添加
     */
    title: string = "";
    type: number = 1;
    description: string = "";
    total: number = 0;
    limit: number = 0;
    discount: number = 0;
    min: number = 0;
    status: number = 1;
    categoryId?: number = undefined;
    days?: number = undefined;
    gmtStart: string = "";
    gmtEnd: string = "";
}

export class ClassAdvertEdit {
    /** 
     * 广告管理编辑
     */
    type?: number = undefined;
    unionType?: number = undefined;
    title: string = "";
    unionValue?: any = undefined;
    imgUrl: string = "";
    status: number = 1;
    color: string = "";
}

export class ClassGroupEdit {
    /** 
     * 团购商品编辑添加
     */
    spuId: number = 0;
    gmtStart: number = 0;
    gmtEnd: number = 0;
    minNum: number = 0;
    automaticRefund: number = 0;
    groupShopSkuList?: [] | string = [];
}


export class ClassAttributeList {
    /**
    * 商品参数
    */
    attribute: string = "";
    value: string = ""
}


export class ClassSpecificationList {
    /**
        规格维度
    */
    title: string = '';
    values: string[] = [];
    gmtCreate: number = 0;
    gmtUpdate: number = 0;
    inputSkuTagVisible: boolean = false;
    inputSkuTagValue: string = "";
}


export class ClassSkuList {
    /**
        商品详情
    */
    price: any = undefined;
    vipPrice: any = undefined;
    originalPrice: any = undefined;
    stock: number = undefined;
    barCode: string = "";
    weight: number = undefined;
    img: string = "";
    title: string = "";
    specification: string = "";
}


export class ClassProductAddEdit {
    /** 
     * 商品列表添加编辑
     */
    title: string = '';
    img: string = '';
    originalPrice: number | null = null;
    price: number | null = null;
    vipPrice: number | null = null;
    freightTemplateId?: number = undefined;
    stock: number = 0
    status: number = 1;
    unit: string = '';
    categoryId: number = 0;
    imgList: string[] = [];
    detail: string = '';
    description: string = '';
    skuList: ClassSkuList[] = [];
    specificationList: ClassSpecificationList[] = [];
    attributeList: ClassAttributeList[] = []
}

/**
 * 标签
 */
export class ClassTag {
    name: string | undefined = '';
    fullPath: string = '';
    title: string | undefined = '';
    constructor(fullPath: string, title: string, name: string) {
        this.fullPath = fullPath;
        this.name = name;
        this.title = title
    }
}